package com.yzh.openai.domain.openai.repository;

import com.yzh.openai.domain.openai.model.entity.UserAccountEntity;

/**
 * OpenAI仓储接口
 */
public interface IOpenAiRepository {
    /**
     * 查询用户账户
     * @param openid
     * @return
     */
    UserAccountEntity queryUserAccount(String openid);

    /**
     * 扣减用户可用次数
     *
     * @param openai
     * @param cost
     */
    int subAccountQuota(String openai, int cost);
}
